#include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <vector>
#define lld long long // long long 的 printf 占位符是 lld
#define ENDL '\n'     // 将 endl 替换为 \n 取消缓冲区

using std::cin;
using std::cout;
using std::vector;

void solve() {
  int n;
  lld L, R;
  lld sum = 0;
  cin >> n >> L >> R;
  vector<lld> s(n);
  for (auto &i : s)
    cin >> i;
  auto cmp = [](int a, int b) { return a < b; };
  auto check = [L, R](lld Area) -> bool { return (L <= Area) and Area <= R; };
  auto LOG_DEBUG = [](int x) { printf("x is %lld\n", x); };
  std::sort(s.begin(), s.end(), cmp);
  for (int i = 0, j = 1; j < n;) {
    while (j < n and s[i] == s[j])
      j++;
    if (j - i >= 2) {
      if (check(s[i] * s[i]))
        sum++;
      else if (s[i] * s[i] > R)
        break;
    }
    i = j;
  }

  // LOG_DEBUG(sum);
  std::set<lld, decltype(cmp)> st(cmp);
  for (auto x : s)
    st.insert(x);
  s.clear();
  for (auto x : st)
    s.push_back(x);
  /*  for (auto x : st)
    LOG_DEBUG(x);
  */ //  s 去重后的边长数组
  auto cal = [s](lld limit) -> lld {
    lld ans = 0;
    int i = 0, j = s.size() - 1;
    while (i < j) {
      lld t = limit / s[i];
      while (j >= 0 and s[j] > t)
        j = j - 1;
      if (j > i)
        ans += j - i;
      i += 1;
    }
    return ans;
  };
  cout << sum + cal(R) - cal(L - 1) << ENDL;
}
int main() {
  int T = 1;
  while (T--) {
    solve();
  }
}